<template>

  <div>

    <data-table
      ref="pagingTable"
      :options="options"
      :list-query="listQuery"
    >
      <template #filter-content>

        

        <el-input v-model="listQuery.params.title" placeholder="搜索考试名称" style="width: 200px;"
                  class="filter-item"/>

      </template>

      <template #data-columns>

        <el-table-column
          label="考试名称"
          prop="title"
          show-overflow-tooltip
        />

        <el-table-column
          label="单选数量"
          prop="radioCount"
          align="center"
        />
        <el-table-column
          label="多选数量"
          prop="multiCount"
          align="center"
        />
        <el-table-column
          label="判断数量"
          prop="judgeCount"
          align="center"
        />



        <el-table-column
          label="操作"
          align="center"
        >
          <template v-slot="scope">
            <el-button icon="el-icon-caret-right" type="primary" size="mini"
                       @click="handlePre(scope.row.id)">去练习
            </el-button>
          </template>

        </el-table-column>

      </template>

    </data-table>

  </div>

</template>

<script>
import DataTable from '@/components/DataTable'
import {checkProcess} from '@/api/paper/exam'
import {applyExamList,} from '@/api/paper/exam'

export default {
  components: {DataTable},
  data() {
    return {
      breakShow: false,
      breakId: '',
      openTypes: [
        {
          value: 1,
          label: '完全开放'
        },
        {
          value: 2,
          label: '定向考试'
        }
      ],

      listQuery: {
        current: 1,
        size: 10,
        params: {}
      },

      options: {
        // 可批量操作
        multi: false,
        // 列表请求URL
        listUrl: '/exam/api/repo/paging'
      }
    }
  },
  methods: {

    // 开始考试
    handlePre(examId) {
      //这里判断 是否有考试资格--申请通过
      this.$router.push({name: 'StartPractice', params: {examId: examId}})
    },
  }
}
</script>
